//管理设备数据相关
import {defineStore} from "pinia";
import { ref} from "vue";
import { useGetEquipmentTypeAPI } from "@/apis/equipmentType.ts";

export const useEquipmentTypeStore=defineStore('fullEquipmentType',()=>{

        //1.定义菜单的数据的state
        const fullEquipmentType=ref([]);

        const getFullEquipmentType=async ( current: number, pageSize: number)=>{
            const res=await  useGetEquipmentTypeAPI(current,pageSize);
            fullEquipmentType.value=res.data;
        }

        //3.以对象的格式把state和action return
        return {
            fullEquipmentType,getFullEquipmentType
        }
    }

)